package com.crm.custinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.crm.custinfo.mapper.CustCommentRecordMapper;
import com.crm.custinfo.domain.CustCommentRecord;
import com.crm.custinfo.service.ICustCommentRecordService;

/**
 * 客户备注记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-03
 */
@Service
public class CustCommentRecordServiceImpl implements ICustCommentRecordService 
{
    @Autowired
    private CustCommentRecordMapper custCommentRecordMapper;

    /**
     * 查询客户备注记录
     * 
     * @param id 客户备注记录主键
     * @return 客户备注记录
     */
    @Override
    public CustCommentRecord selectCustCommentRecordById(Long id)
    {
        return custCommentRecordMapper.selectCustCommentRecordById(id);
    }

    /**
     * 查询客户备注记录列表
     * 
     * @param custCommentRecord 客户备注记录
     * @return 客户备注记录
     */
    @Override
    public List<CustCommentRecord> selectCustCommentRecordList(CustCommentRecord custCommentRecord)
    {
        return custCommentRecordMapper.selectCustCommentRecordList(custCommentRecord);
    }

    /**
     * 新增客户备注记录
     * 
     * @param custCommentRecord 客户备注记录
     * @return 结果
     */
    @Override
    public int insertCustCommentRecord(CustCommentRecord custCommentRecord)
    {
        custCommentRecord.setCreateTime(DateUtils.getNowDate());
        return custCommentRecordMapper.insertCustCommentRecord(custCommentRecord);
    }

    /**
     * 修改客户备注记录
     * 
     * @param custCommentRecord 客户备注记录
     * @return 结果
     */
    @Override
    public int updateCustCommentRecord(CustCommentRecord custCommentRecord)
    {
        return custCommentRecordMapper.updateCustCommentRecord(custCommentRecord);
    }

    /**
     * 批量删除客户备注记录
     * 
     * @param ids 需要删除的客户备注记录主键
     * @return 结果
     */
    @Override
    public int deleteCustCommentRecordByIds(Long[] ids)
    {
        return custCommentRecordMapper.deleteCustCommentRecordByIds(ids);
    }

    /**
     * 删除客户备注记录信息
     * 
     * @param id 客户备注记录主键
     * @return 结果
     */
    @Override
    public int deleteCustCommentRecordById(Long id)
    {
        return custCommentRecordMapper.deleteCustCommentRecordById(id);
    }
}
